package com.bto.solar.work.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * <p>
 * 备案信息（后台提前录入，业务直接调用）
 * </p>
 *
 * @author adrian
 * @since 2023-08-28
 */
@Getter
@Setter
@Accessors(chain = true)
@ApiModel(value = "Record对象", description = "备案信息（后台提前录入，业务直接调用）")
public class Record implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("备案证编码")
    @TableId(value = "record_certificate_id", type = IdType.INPUT)
    @NotBlank(message = "备案证编码不能为空")
    private String recordCertificateId;

    @ApiModelProperty("备案证容量(W)")
    @NotNull(message = "备案证容量(W)不能为空")
    private Integer recordCertificateCapacity;

    @ApiModelProperty("备案类型（1：大备案，2：单个备案）")
    @NotNull(message = "备案类型不能为空")
    private Byte recordType;

    @ApiModelProperty("大备案：剩余容量")
    private Integer surplusCapacity;

    @ApiModelProperty("附件（PDF或图片）")
    @NotBlank(message = "附件（PDF或图片）不能为空")
    private String accessory;

    @ApiModelProperty("授权公司")
    public String accreditCompanyIds;

    @ApiModelProperty("归属项目公司")
    @NotBlank(message = "归属项目公司不能为空")
    private String companyId;

    @ApiModelProperty("上传用户id")
    private Long userId;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Timestamp createTime;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Timestamp updateTime;
}
